home *** CD-ROM | disk | FTP | other *** search
/ Resource Library: Multimedia / Resource Library: Multimedia.iso / space / software / unix / xanim / xanim_ff.h < prev    next >
Encoding:
C/C++ Source or Header  |  1992-08-04  |  3.2 KB  |  176 lines

  1.  
  2. /*
  3.  * xanim_iff.h
  4.  *
  5.  * Copyright (C) 1990,1991,1992 by Mark Podlipec. 
  6.  * All rights reserved.
  7.  *
  8.  * This software may be freely copied, modified and redistributed
  9.  * without fee provided that this copyright notice is preserved 
  10.  * intact on all copies and modified copies.
  11.  * 
  12.  * There is no warranty or other guarantee of fitness of this software.
  13.  * It is provided solely "as is". The author(s) disclaim(s) all
  14.  * responsibility and liability with respect to this software's usage
  15.  * or its effect upon hardware or computer systems.
  16.  *
  17.  */
  18. /* flags */
  19. extern int verbose;
  20.  
  21. /* variables */
  22. extern int imagex;
  23. extern int imagey;
  24. extern int imagec;
  25. extern int imaged;
  26.  
  27. /* technically iff 
  28. #define CMAP_SIZE 256
  29. typedef struct
  30. {
  31.  UBYTE red,green,blue;
  32. } ColorReg;
  33. extern ColorReg cmap[256];
  34. */
  35.  
  36. typedef struct 
  37. {
  38.  LONG id;
  39.  LONG size;
  40. } Chunk_Header;
  41.  
  42. /* Graphic Stuff */
  43. #define ANHD 0x414e4844
  44. #define ANIM 0x414e494d
  45. #define ANSQ 0x414e5351
  46. #define BMHD 0x424d4844
  47. #define BODY 0x424f4459
  48. #define CAMG 0x43414d47
  49. #define CMAP 0x434d4150
  50. #define CRNG 0x43524e47
  51. #define DLTA 0x444c5441
  52. #define DPAN 0x4450414e
  53. #define DPPS 0x44505053
  54. #define DPPV 0x44505056
  55. #define DRNG 0x44524e47
  56. #define FORM 0x464f524d
  57. #define GRAB 0x47524142
  58. #define ILBM 0x494c424d
  59. #define IMRT 0x494d5254
  60. #define DPI  0x44504920
  61.  
  62. /* Grouping Stuff */
  63. #define LIST 0x4c495354
  64. #define PROP 0x50524f50
  65. #define FACE 0x46414345
  66.  
  67. /* Sound stuff */
  68. #define VHDR 0x56484452
  69. #define ANNO 0x414e4e4f
  70. #define CHAN 0x4348414e
  71.  
  72.  
  73. typedef struct
  74. {
  75.  UWORD width, height;
  76.  WORD x, y;
  77.  UBYTE depth;
  78.  UBYTE masking;
  79.  UBYTE compression;
  80.  UBYTE pad1;
  81.  UWORD transparentColor;
  82.  UBYTE xAspect, yAspect;
  83.  WORD pageWidth, pageHeight;
  84. } Bit_Map_Header;
  85.  
  86. #define BMHD_COMP_NONE 0L
  87. #define BMHD_COMP_BYTERUN 1L
  88.  
  89. #define BMHD_MSK_NONE 0L
  90. #define BMHD_MSK_HAS 1L
  91. #define BMHD_MSK_TRANS 2L
  92. #define BMHD_MSK_LASSO 3L
  93.  
  94. #define mskNone                 0
  95. #define mskHasMask              1
  96. #define mskHasTransparentColor  2
  97. #define mskLasso                3
  98.  
  99. #define cmpNone      0
  100. #define cmpByteRun1  1
  101.  
  102. /* Aspect ratios: The proper fraction xAspect/yAspect represents the pixel
  103.  * aspect ratio pixel_width/pixel_height.
  104.  *
  105.  * For the 4 Amiga display modes:
  106.  *   320 x 200: 10/11  (these pixels are taller than they are wide)
  107.  *   320 x 400: 20/11
  108.  *   640 x 200:  5/11
  109.  *   640 x 400: 10/11      */
  110. #define x320x200Aspect 10
  111. #define y320x200Aspect 11
  112. #define x320x400Aspect 20
  113. #define y320x400Aspect 11
  114. #define x640x200Aspect  5
  115. #define y640x200Aspect 11
  116. #define x640x400Aspect 10
  117. #define y640x400Aspect 11
  118.  
  119.  
  120. typedef struct
  121. {
  122.  UWORD width,height;
  123.  WORD x, y;
  124.  WORD xoff, yoff;
  125. } Face_Header;
  126.  
  127.  
  128.  
  129. typedef struct 
  130. {
  131.  LONG id;
  132.  LONG size;
  133.  LONG subid;
  134. } Group_Header;
  135.  
  136. typedef struct 
  137. {
  138.  LONG id;
  139.  LONG size;
  140.  LONG subid;
  141.  UBYTE grpData[ 1 ];
  142. } Group_Chunk;
  143.  
  144. typedef struct
  145. {
  146.  UBYTE op;
  147.  UBYTE mask;
  148.  UWORD w,h;
  149.  UWORD x,y;
  150.  ULONG abstime;
  151.  ULONG reltime;
  152.  UBYTE interleave;
  153.  UBYTE pad0;
  154.  ULONG bits;
  155.  UBYTE pad[16];
  156. } Anim_Header;
  157. #define Anim_Header_SIZE 40
  158.  
  159. typedef struct
  160. {
  161.  int minx;
  162.  int miny;
  163.  int maxx;
  164.  int maxy;
  165. } IFF_DLTA_HDR;
  166.  
  167. extern void IFF_Read_File();
  168. extern void IFF_HAM_To_332();
  169. extern void IFF_Delta5();
  170. extern void IFF_Delta3();
  171. extern void IFF_Deltal();
  172. extern int IFF_DeltaJ();
  173. extern int Is_IFF_File();
  174. extern int UnPackRow();
  175.  
  176.